<meta title="新建目录" args="parentId" width="500px"/>
<div class="p">
    <form s="valid,form" id="form" class="form-horizontal" action="api/vfile/dir">
        <input autocomplete="off" type="text" name="name" s-valid-error="require()"
               s-window-role="focus"
               class="form-control" placeholder="请输入文件夹名称">
        <br />
        <input autocomplete="off" type="text" name="code"
               class="form-control" placeholder="编码，编码必须要保证唯一性">
        <input autocomplete="off" type="hidden" name="parentId" s s-data="parentId || 0" />
    </form>
</div>
<script type="text/javascript">
    S.meta.btns = [
        {
            name: "创建",
            style: "btn btn-primary",
            click: function() {
                return $form.submit().done(function(){
                    S.close(true);
                })
            }
        },
        {
            name: "关闭",
            style: "btn btn-default",
            click: function() {
                S.close();
            }
        }
    ]
</script>